"""
用户
"""

from api import user_router
from biz import user_biz
from schema.request_schema.user_request import UserRegisterRequest
from schema.response_schema.user_response import AuthenticationResponse


@user_router.get(
    path="/check/",
    summary="用户检查",
)
async def user_check():
    """ 用户检查接口 """

    return "Pong"


@user_router.get(
    path="/info/",
    summary="用户信息",
)
async def user_info():
    """ 用户信息接口 """

    return "Pong"


@user_router.post(
    path="/register/",
    summary="用户注册",
    response_model=AuthenticationResponse,
)
async def user_register(request: UserRegisterRequest):
    """ 用户注册接口 """

    return {"data": user_biz.UserRegister.register(request)}
